// spPageOptions.js

jQuery(document).ready(function(){

	jQuery( 'body' ).on( 'click', '.spPageOptions .spSaveOption', function(e) {
			
		container = jQuery(this).closest('.spPageOptions');
		database 	= container.attr( "data-database" );
		formbuilder = container.attr( "data-formbuilder" );

		ser = container.find("form:first").serialize();
		ser+= "&database="+database;
		ser+= "&formbuilder="+formbuilder;
		
		spAjaxCallback({ 
			callback 	: "spAjaxOptionsSave", 
			paramstr	: ser,
			title		: 'Saving...',
			success		: function(){
				
			}
		});

		
	});

});